Using [self method] or @selector(method)?

Posted by fuzzygoat on Stack Overflow See other posts from Stack Overflow or by fuzzygoat
Published on 2010-04-20T11:58:08Z Indexed on 2010/04/20 12:13 UTC
Read the original article Hit count: 183

Filed under:
|
|

Can anyone enlighten me as to the differences between the two statements below.

[self playButtonSound];

AND:

[self performSelector:@selector(playButtonSound)];

I am just asking as I had some old code that used @selector, now with a little more knowledge I can't think why I did not use [self playButtonSound] instead, they both seem to do the same as written here.

gary

© Stack Overflow or respective owner

Related posts about cocoa-touch

Related posts about objective-c